package com.freecloud.javabasics.design.memento.demo1;

import java.util.Stack;

/**
 * @Author: maomao
 * @Date: 2020-03-18 22:07
 */
public class DraftsBox {

    private final Stack<ArticleMemento> STACK = new Stack<>();

    public ArticleMemento getMemento(){
        ArticleMemento memento = STACK.pop();
        return memento;
    }
    public void addMemento(ArticleMemento articleMemento){
        STACK.push(articleMemento);
    }
}
